package cn.guo.dao.impl;


import java.util.List;

import cn.guo.dao.INewsDao;
import cn.guo.entity.News;


public class NewsDao extends BaseDao<News> implements INewsDao {

	@SuppressWarnings("unchecked")
	public List<News> getAll(String ntitle) {
		return getSessionFactory().getCurrentSession()//
			.createQuery("from News where ntitle like ?")//
			.setParameter(0, "%" +ntitle + "%")//
			.list();
	}

}